<template>
  <div class="mv_container_newMv">
    <div class="mv_container_newMv_head">
      <div class="mv_container_newMv_head_left">
        <span>{{name}}</span>
        <i class="el-icon-arrow-right"></i>
      </div>
      <slot></slot>
    </div>
    <div class="mv_container_newMv_contact" v-loading="mvDomLoading">
      <div
        class="mv_container_newMv_contact_inside"
        v-for="item in areaInfoList"
        :key="item.id"
        @click="jumpMV(item.id)"
      >
        <div class="mv_container_newMv_contact_inside_img">
          <el-image :src="item.cover" lazy></el-image>
          <div class="mv_container_newMv_contact_inside_img_span">
            <i class="el-icon-caret-right"></i>
            <span>{{ parseInt(item.playCount / 10000) + "万" }}</span>
          </div>
        </div>
        <div class="mv_container_newMv_contact_inside_title">
          {{ item.name }}
        </div>
        <div class="mv_container_newMv_contact_inside_artists">
          <span v-for="(childItem, index) in item.artists" :key="childItem.id">
            {{
              (index == item.artists.length - 1 && childItem.name) ||
                childItem.name + "/"
            }}
          </span>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  props: {
    areaInfoList: {
      type: Array,
    },
    name: {
      type: String,
    },
    mvDomLoading: {
      type: Boolean,
    },
  },
  methods:{
    jumpMV(id){
      this.$emit('jumpMV',id)
    }
  }
};
</script>

<style lang="scss" scoped>
@import "../common/css/commonStyle";
.mv_container_newMv {
  width: 100%;
  margin-bottom: 20px;
  .mv_container_newMv_head {
    margin-bottom: 20px;
    width: 100%;
    display: flex;
    justify-content: space-between;
    .mv_container_newMv_head_left {
      font-weight: 800;
      font-size: 19px;
    }
  }
  .mv_container_newMv_contact {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    .mv_container_newMv_contact_inside {
      width: 30%;
      height: 210px;
      margin-bottom: 15px;
      cursor: pointer;
      display: flex;
      flex-direction: column;
      justify-content: space-around;
      .mv_container_newMv_contact_inside_img {
        width: 100%;
        height: 150px;
        .el-image {
          width: 100%;
          height: 100%;
          border-radius: 5px;
        }
        .mv_container_newMv_contact_inside_img_span {
          position: relative;
          left: 170px;
          bottom: 150px;
          display: flex;
          color: rgb(214, 214, 214);
        }
      }
      .mv_container_newMv_contact_inside_title {
        font-size: 15px;
        @include white_space;
      }
      .mv_container_newMv_contact_inside_artists {
        font-size: 14px;
        color: #aca8a8;
      }
    }
  }
}
</style>
